package com.onlinefurnitureshop.customer.service.impl;

import java.util.List;

import com.onlinefurnitureshop.customer.dao.ShoppingCarDao;
import com.onlinefurnitureshop.customer.model.ShoppingCar;
import com.onlinefurnitureshop.customer.service.ShoppingCarService;
import com.onlinefurnitureshop.order.dao.ConsigneeDao;
import com.onlinefurnitureshop.order.dao.OrderDao;
import com.onlinefurnitureshop.order.model.Payment;
import com.onlinefurnitureshop.order.model.PaymentType;

public class ShoppingCarServiceImpl implements ShoppingCarService{
	private ShoppingCarDao shoppingCarDao;
	private ConsigneeDao consigneeDao;
	private OrderDao orderDao;

	public ShoppingCarDao getShoppingCarDao() {
		return shoppingCarDao;
	}

	public void setShoppingCarDao(ShoppingCarDao shoppingCarDao) {
		this.shoppingCarDao = shoppingCarDao;
	}

	@Override
	public List<ShoppingCar> showShoppingCar(int userId) {
		List<ShoppingCar> shoppingCars=shoppingCarDao.showShoppingCar(userId);
		return shoppingCars;
	}


	public ConsigneeDao getConsigneeDao() {
		return consigneeDao;
	}

	public void setConsigneeDao(ConsigneeDao consigneeDao) {
		this.consigneeDao = consigneeDao;
	}

	public OrderDao getOrderDao() {
		return orderDao;
	}

	public void setOrderDao(OrderDao orderDao) {
		this.orderDao = orderDao;
	}

	@Override
	public void delete(Object entity) {
		shoppingCarDao.delete(entity);
		
	}

	@Override
	public ShoppingCar findShoppingCarById(int id) {
		return shoppingCarDao.findShoppingCarById(id);
		
	}

	@Override
	public void add(ShoppingCar shoppingCar) {
		shoppingCarDao.add(shoppingCar);
		
	}


	@Override
	public List findConsigneesByCusId(int id) {
		return consigneeDao.findConsigneesByCusId(id);

	}

	@Override
	public List findAllPaymentType() {
		return orderDao.findAllPaymentType();
	}

	@Override
	public void updateShoppingCar(ShoppingCar shoppingCar) {
		shoppingCarDao.updateShoppingCar(shoppingCar);
	}
	
}
